<%--
  Created by IntelliJ IDEA.
  User: l
  Date: 2023/6/23
  Time: 18:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="order-info.css">
<body>
<div class="container">
    <img src="../upload/${product.photo}" alt="" class="goods-img">
    <div class="order-info">
        <div class="status">
            <p>订单状态:</p>
            <span>
                <c:if test="${isSole == '1'}">
                    <c:if test="${order.state == '0'}">
                        待确认
                    </c:if>
                    <c:if test="${order.state == '1'}">
                        待买家支付
                    </c:if>
                    <c:if test="${order.state == '2'}">
                        确认收款
                    </c:if>
                    <c:if test="${order.state == '3'}">
                        完成
                    </c:if>
                </c:if>

                <c:if test="${isSole == '0'}">
                    <c:if test="${order.state == '0'}">
                        待卖家确认
                    </c:if>
                    <c:if test="${order.state == '1'}">
                        请支付
                    </c:if>
                    <c:if test="${order.state == '2'}">
                        待确认收款
                    </c:if>
                    <c:if test="${order.state == '3'}">
                        完成
                    </c:if>
                </c:if>
            </span>
        </div>
        <div class="infos">
            <!-- 商品信息 -->
            <div class="goods-info">
                <div class="title">商品信息</div>
                <div class="name">
                    <p class="col">商品名称(描述):</p>
                    <p>${product.name}</p>
                </div>
                <div class="name">
                    <p class="col">区:</p>
                    <p>${product.game}</p>
                </div>
                <div class="name">
                    <p class="col">金额:</p>
                    <p>￥${product.price}</p>
                </div>
                <div class="name">
                    <p class="col">提供方:</p>
                    <p>@${soleUser.netname}</p>
                </div>
            </div>
            <!-- 交易信息 -->
            <div class="trade-info">
                <div class="title">交易信息</div>
                <div class="name">
                    <p class="col">买家实名:</p>
                    <p>${buyUser.turename}</p>
                </div>
                <div class="name">
                    <p class="col">买家卡号/支付宝:</p>
                    <p>${buyUser.bankCard}</p>
                </div>
                <div class="name">
                    <p class="col">交易金额:</p>
                    <p>￥${product.price}</p>
                </div>
                <div class="name">
                    <p class="col">卖家实名:</p>
                    <c:if test="${order.state != '0'}">
                    <p>${soleUser.turename}</p>
                    </c:if>
                </div>
                <div class="name">
                    <p class="col">卖家卡号/支付宝:</p>
                    <c:if test="${order.state != '0'}">
                        <p>${soleUser.bankCard}</p>
                    </c:if>
                </div>
                <div class="name">
                    <p class="col">交易时间:</p>
                    <p>${order.createTime}</p>
                </div>
            </div>
<%--                //买家--%>
            <c:if test="${isSole == '0'}">
            <c:if test="${order.state != '0'}">
            <div class="pay-info">
                <div class="title">交易凭证</div>
                <c:if test="${order.state != '1'}">
                <img src="../upload/${order.paid}" alt="">
                </c:if>
                <c:if test="${order.state != '2' && order.state != '3'}">
                <p>
                    <form action="/shang/shang_uploadPaid" enctype="multipart/form-data" method="post">
                    <input name="id" value="${order.id}" type="hidden">
                    <input name="photo" type="file">  <input type="submit"value="确认上传">
                    </form>
                </p>
                </c:if>
            </div>
            </c:if>
            </c:if>
            <%--卖家--%>
            <c:if test="${isSole == '1'}">
                <div class="pay-info">
                    <div class="title">交易凭证</div>
                    <c:if test="${order.state != '1' && order.state != '0'}">
                        <img src="../upload/${order.paid}" alt="">
                    </c:if>
                </div>
            </c:if>
        </div>
    </div>

</div>
</body>
</html>